<template>
  <div v-if="isVisable">
    <div  v-for="(child,index) in childrenMenu" :key="index"  >
      <div @click="goto(child.url)" class="menu-item"  >
        {{child.menuName}}
      </div>
    </div>
  </div>

</template>

<script >
export default {
  name: "my-nev-child",
  props:{
    childrenMenu:[],
    index:Number,
  },
  data(){
    return{
      isVisable:false,
    }
  },
  methods:{
    goto(path){
      this.$router.push({ path:  path }).catch(()=>{});
    },
    isV(){
      this.isVisable=true
    },
    isH(){
      this.isVisable=false
    }
  }

}
</script>

<style scoped>
.menu-item{
  width: 90px;
  height: 35px;
  margin-top: 5px;
  text-align: center;
  align-content: center;
  margin-left: 10px;
  /* padding: 10px; */
  background-color: #85AEDD;
  color: #ffffff;
  border-radius: 3px
}
.menu-item:hover{
  cursor: pointer;
}
</style>
